import request from '@/router/axios'

export function allocationPage(data) {
    return request({
        url: '/rms-api/wx/allocation/allocationPage',
        method: 'get',
        params: data
    })
}

export function addAllocation(data) {
    return request({
        url: '/rms-api/wx/allocation/addAllocation',
        method: 'post',
        data: data
    })
}

export function updateAllocation(data) {
    return request({
        url: '/rms-api/wx/allocation/updateAllocation',
        method: 'post',
        data: data
    })
}

export function deleteAllocation(data) {
    return request({
        url: '/rms-api/wx/allocation/deleteAllocation',
        method: 'get',
        params: data
    })
}

//------ 平台配置 ---------
export function platformPage(data) {
    return request({
        url: '/rms-api/rms/platform/platformPage',
        method: 'get',
        params: data
    })
}

export function addPlatform(data) {
    return request({
        url: '/rms-api/rms/platform/addPlatform',
        method: 'post',
        data: data
    })
}

export function updatePlatform(data) {
    return request({
        url: '/rms-api/rms/platform/updatePlatform',
        method: 'post',
        data: data
    })
}

export function deletePlatform(data) {
    return request({
        url: '/rms-api/rms/platform/deletePlatform',
        method: 'get',
        params: data
    })
}

// ------礼品卷 -------
export function getById() {
    return request({
        url: '/sms-api/gift/allocation/getById',
        method: 'get',
    })
}

export function update(data) {
    return request({
        url: '/sms-api/gift/allocation/update',
        method: 'post',
        data: data
    })
}

// ----- app 更新 ------ 

export function addApp(data) {
    return request({
        url: '/rms-api/app/update/addApp',
        method: 'post',
        data: data
    })
}

export function appPage(data) {
    return request({
        url: '/rms-api/app/update/appPage',
        method: 'get',
        params: data
    })
}

export function appUpdate(data) {
    return request({
        url: '/rms-api/app/update/appUpdate',
        method: 'post',
        data: data
    })
}

export function removeApp(data) {
    return request({
        url: '/rms-api/app/update/removeApp',
        method: 'get',
        params: data
    })
}